<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3"><span class="font-bold" translate="aside.nav.process.accumulation">Accumulation</span>
    </h1>
</div>
<div ng-class="isSmart?'':'wrapper-md'" class="remove-wrapper" style="font-size:12px;">
    <div ng-controller="AccumulationDataTableController">
        <tabset class="tab-container">
            <tab>
                <tab-heading ng-click="startSearch('')" style="padding-left:20px; font-weight:bold"><span
                        translate="business.servreq.patient"></span><span class="badge bg-danger badge-sm m-l-xs"
                                                                          style="background:none">&nbsp;</span>
                </tab-heading>
                <div class="row">
                    <div class="col-xs-12">
                        <div class="input-group">
                            <input ng-model="$parent.search" class="form-control"
                                   placeholder="{{ (selectLang == 'English') ? 'enter keywords' : '\u8bf7\u8f93\u5165\u5173\u952e\u5b57' }}"
                                   type="text" autocomplete="off">
                            <span class="input-group-btn">
                        <button class="btn btn-success font-bold" type="button"
                                ng-click="startSearch($parent.search)"><span
                                translate="business.navtitle.search_patient">Search</span> </button>
                        </span></div>
                    </div>

                </div>
                <div class="row">
                    <table ui-jq="dataTable" ui-options="dtOptions" class="table table-striped m-b-none"
                           style="width:100%;">
                        <thead>
                        <tr>
                            <th ng-class="isSmart?'col-xs-4':''" translate="business.servreq.id"></th>
                            <th translate="common.updated" ng-if="!isSmart"></th>
                            <th ng-class="isSmart?'col-xs-4':''" translate="common.name"></th>
                            <th translate="user.gender" ng-if="!isSmart"></th>
                            <th ng-if="!isSmart"><span translate="business.patcase.disease_type"></span></th>
                            <th translate="user.province" ng-if="!isSmart"></th>
                            <th translate="user.city" ng-if="!isSmart"></th>
                            <th ng-class="isSmart?'col-xs-4':''" translate="common.operate"></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="serv in servRequests">
                            <td>S-{{ serv.servReq_Id }}</td>
                            <td ng-if="!isSmart">{{ moment(serv._patCase._patient.updated).format("YYYY-MM-DD")}}</td>
                            <td>{{ serv._patCase._patient._user.realName }}</td>
                            <td ng-if="!isSmart"><span ng-show="serv._patCase._patient._user.gender != null"
                                                       translate="{{ 'user.gender.' + serv._patCase._patient._user.gender }}"></span>
                            </td>
                            <td ng-if="!isSmart"><span
                                    translate="{{'business.patcase.disease_type_' + serv._diseaseType.desc}}"></span>
                            </td>
                            <td ng-if="!isSmart">{{ selectLang == 'English' ?
                                serv._patCase._patient._user._province.loca_En_Name :
                                serv._patCase._patient._user._province.loca_Cn_Name }}
                            </td>
                            <td ng-if="!isSmart">{{ selectLang == 'English' ?
                                serv._patCase._patient._user._city.loca_En_Name :
                                serv._patCase._patient._user._city.loca_Cn_Name }}
                            </td>
                            <td>
                                <button type="button" ng-click="open({ templateUrl: 'openServReq.html'}, {{ serv }} );"
                                        class="btn btn-sm btn-info font-bold"
                                        title="{{ 'common.details' | translate }}">
                                    <span translate="common.details"></span>
                                </button>
                                <button type="button" ng-click="AssignToOpeCenTimePopup(serv)"
                                        class="btn btn-sm btn-success font-bold"
                                        title="{{'business.accumulation.arrangeSurgeryCenter' | translate}}"
                                        ng-if="currentUser.isMedicalAdmin == true">
                                    <span translate="common.fixed"></span>
                                </button>
                                <button type="button" class="btn btn-sm btn-warning font-bold"
                                        ng-click="openRefuseForOperation(serv)"
                                        ng-if="currentUser.isMedicalAdmin == true"
                                        title="{{'business.accumulation.revokeFromOCT' | translate}}">
                                    <span translate="common.stop"></span>
                                </button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </tab>

            <tab>
                <tab-heading style=" font-weight:bold"><span translate="aside.nav.basic.opeCentManage"></span><span
                        class="badge bg-danger badge-sm m-l-xs">{{assignedCount}}</span></tab-heading>
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-sm-12">
                            <button type="button" ng-click="openAddOCT()"
                                    class="btn btn-sm btn-danger pull-left font-bold"
                                    ng-disabled="loadingHospital == true"
                                    ng-if="currentUser.isMedicalAdmin == true">
                                <em class="fa fa-plus"></em><span translate="business.accumulation.addOpeTime"></span>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="panel" style="margin-left:-15px; margin-right:-15px">
                    <table class="table" ng-init="getOperationCenters()">
                        <tbody>
                        <tr ng-repeat="opeCent in ArrHospital">
                            <td ng-show="opeCent.OpeCentTime.length > 0" style="border-top:none; margin-left:0px;">
                                <ul class="list-group" style="margin-bottom:0px">
                                    <li class="list-group-item">
                                        <h4 style="font-weight:bold">{{ArrHospital.indexOf(opeCent) + 1 }}.
                                            {{opeCent.hosp_Cn_Name}}</h4>
                                        (
                                        {{selectLang == 'English' ? opeCent._province.loca_En_Name :
                                        opeCent._province.loca_Cn_Name}}
                                        {{selectLang == 'English' ? opeCent._city.loca_En_Name :
                                        opeCent._city.loca_Cn_Name}}
                                        )
                                        <ul class="list-group"
                                            ng-show="opeCent.OpeCentTime.length > 0">
                                            <li class="list-group-item" style="position: relative"
                                                ng-repeat="opeCenTime in opeCent.OpeCentTime">
                                                <div class="media">
                                                    <div class="col-sm-3" style="margin-left:-15px;">
                                                        <div>
                                                            <label class="col-sm-12"
                                                                   style="margin-left:-15px; font-weight:bold">
                                                                <span translate="business.accumulation.operation"></span>
                                                            </label>
                                                        </div>
                                                        <label class="col-sm-12"
                                                               style="margin-left:-15px; font-weight:bold">
                                                            <span translate="business.accumulation.surgeon"></span>:{{opeCenTime._surgeon.realName}}
                                                        </label>
                                                        <br/>
                                                        <label class="col-sm-12"
                                                               style="margin-left:-15px; font-weight:bold">
                                                            <span translate="business.accumulation.dateOpe"></span>
                                                            :
                                                            {{(opeCenTime.date_Operation)?moment(opeCenTime.date_Operation).format('YYYY-MM-DD'):''}}
                                                        </label>
                                                        <br/>
                                                        <p>
                                                            <button type="button"
                                                                    ng-click="openAssignSurgeon(opeCenTime)"
                                                                    class="btn btn-sm btn-success"
                                                                    title="{{ 'business.accumulation.assignSurgeon'|translate}}"
                                                                    ng-if="currentUser.isMedicalAdmin == true"
                                                            ><em class="fa fa-user-md"></em></button>
                                                            <button type="button"
                                                                    ng-click="setTimeOfOCT(opeCenTime)"
                                                                    class="btn btn-sm btn-info"
                                                                    title="{{ 'business.accumulation.setTimeOfOCT'|translate}}"
                                                                    ng-if="currentUser.isMedicalAdmin == true"
                                                            ><em class="fa fa-calendar"></em></button>
                                                            <button type="button"
                                                                    ng-click="openDeleteOCT(opeCenTime)"
                                                                    class="btn btn-sm btn-danger"
                                                                    title="{{ 'common.delete'|translate}}"
                                                                    ng-if="currentUser.isMedicalAdmin == true"
                                                            ><em class="fa fa-trash  "></em></button>
                                                            <button type="button"
                                                                    ng-click="openFinishOCT(opeCenTime)"
                                                                    class="btn btn-sm btn-dark"
                                                                    title="{{ 'business.accumulation.finishOCT'|translate}}"
                                                                    ng-if="opeCenTime.canModify"
                                                            ><em class="fa fa-check  "></em></button>
                                                        </p>
                                                    </div>
                                                    <div class="col-sm-9"
                                                         style="padding:0; margin-left:-15px;margin-bottom:-10px; margin-right:-15px;">
                                                        <table class="table table-bordered" width="100%;">
                                                            <thead>
                                                            <tr>
                                                                <th translate="business.servreq.id"
                                                                    class="text-center"></th>
                                                                <th class="text-center" ng-if="!isSmart"><span
                                                                        translate="common.updated"></span></th>
                                                                <th class="text-center"><span
                                                                        translate="common.name"></span></th>
                                                                <th class="text-center" ng-if="!isSmart"><span
                                                                        translate="user.gender"></span></th>
                                                                <th class="text-center" ng-if="!isSmart"><span
                                                                        translate="business.patcase.disease_type"></span>
                                                                </th>
                                                                <th class="text-center"><span
                                                                        translate="common.operate"></span></th>
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                            <tr ng-repeat="serv in opeCenTime._servReqs"
                                                                class="text-center">
                                                                <td style="vertical-align:middle;"><span>S-{{ serv.servReq_Id }}</span>
                                                                </td>
                                                                <td ng-if="!isSmart" style="vertical-align:middle;">{{
                                                                    moment(serv._patCase._patient.updated).format('YYYY-MM-DD')
                                                                    }}
                                                                </td>
                                                                <td style="vertical-align:middle;">{{
                                                                    serv._patCase._patient._user.realName }}
                                                                </td>
                                                                <td ng-if="!isSmart" style="vertical-align:middle;">
                                                                    <span ng-show="serv._patCase._patient._user.gender != null"> {{ 'user.gender.' + serv._patCase._patient._user.gender  | translate}} </span>
                                                                </td>
                                                                <td ng-if="!isSmart" style="vertical-align:middle;">
                                                                    {{'business.patcase.disease_type_' +
                                                                    serv._diseaseType.desc | translate}}
                                                                </td>
                                                                <td style="width: 30%;padding: 10px 30px; text-align: left;">
                                                                    <button type="button"
                                                                            ng-click="open({ templateUrl: 'openServReq.html'}, {{ serv }} );"
                                                                            class="btn btn-sm btn-info font-bold"
                                                                            title="{{ 'common.details' | translate }}"
                                                                    > {{'common.details' | translate}}
                                                                    </button>
                                                                    <button type="button"
                                                                            class="btn btn-sm btn-danger font-bold"
                                                                            ng-if="serv.canRevokeOpeCenTime == true"
                                                                            ng-click="openRevokeFromOCT(serv, opeCenTime._servReqs)"
                                                                    > {{'common.delete' | translate}}
                                                                    </button>
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                    <div style="position: absolute; right:0; top: 0;">
                                                        <button type="button"
                                                                ng-click="openAssignServReq(opeCenTime)"
                                                                class="btn btn-sm btn-warning font-bold"
                                                                title="{{ 'business.accumulation.assignPatient'|translate}}"
                                                                ng-if="opeCenTime.canModify"
                                                        >{{'business.accumulation.add'|translate}}
                                                        </button>
                                                    </div>
                                                </div>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </tab>
        </tabset>
    </div>
</div>

<div ng-include="'views/work/templates.html'"></div>

<script type="text/ng-template" id="openServReq.html">
    <div ng-include="'views/work/basic_servreq_flow.html?abc=d'"></div>
</script>

<script type="text/ng-template" id="DetailServRequest.html">
    <div class="modal-header">
        <h4>{{ 'business.navtitle.patinfo' | translate }}</h4>
    </div>
    <div class="modal-body">
        <div class="list-group bg-white">
            <a href="" class="list-group-item">
                <p class="m-b-md">
                    <i class="fa fa-user icon-muted fa-fw"></i> {{items._patCase._patient._user.realName}} </p>
                <tabset class="tab-container">
                    <tab heading="{{ 'business.navtitle.patinfo' | translate }}">

                        <div class="form-group">
                            <label class="col-sm-2">{{ 'user.icNo' | translate }}</label>

                            <div class="col-sm-4">
                                <input type="text" class="form-control" required
                                       ng-model="items._patCase._patient._user.icNo" ng-disabled="viewOnly"
                                       ng-blur="onCheckIcNo($event, patient._user.icNo, patient.patient_Id)"
                                       autocomplete="off">
                            </div>
                            <label class="col-sm-2">{{ 'user.realname' | translate }}</label>

                            <div class="col-sm-4">
                                <input type="text" class="form-control" required
                                       ng-model="items._patCase._patient._user.realName" ng-disabled="viewOnly"
                                       autocomplete="off">
                            </div>
                            <div class="clearfix"></div>
                            <label class="col-sm-2">{{ 'user.gender' | translate }}</label>

                            <div class="col-sm-4">
                                <select class="form-control" required ng-model="items._patCase._patient._user.gender"
                                        ng-disabled="true"
                                        ng-options="item.value as item['displayName' + locale] for item in gender"></select>
                            </div>
                            <label class="col-sm-2">{{ 'user.age' | translate }}</label>

                            <div class="col-sm-4">
                                <input type="text" class="form-control" min="0" data-max="200" required
                                       ng-model="items._patCase._patient._user.age" ng-disabled="viewOnly"
                                       ui-jq="TouchSpin" autocomplete="off">
                            </div>
                            <div class="clearfix"></div>
                            <label class="col-sm-2">{{ 'user.marriage' | translate }}</label>

                            <div class="col-sm-4">
                                <select class="form-control" required ng-model="items._patCase._patient._user.marriage"
                                        ng-disabled="true"
                                        ng-options="item.value as item['displayName' + locale] for item in marriage"></select>
                            </div>
                            <label class="col-sm-2">{{ 'user.ethnic' | translate }}</label>

                            <div class="col-sm-4">
                                <select class="form-control" required ng-model="items._patCase._patient._user.race_Id"
                                        ng-disabled="true"
                                        ng-options="item.race_Id as item.race_Name for item in races"></select>
                            </div>
                            <div class="clearfix"></div>
                            <label class="col-sm-2">{{ 'user.country' | translate }}</label>

                            <div class="col-sm-4">

                                {{items._patCase._patient._user._country.country_En_Name}}
                            </div>
                            <label class="col-sm-2">{{ 'user.province' | translate }}</label>

                            <div class="col-sm-4">
                                {{items._patCase._patient._user._province.loca_Cn_Name}}
                            </div>
                            <div class="clearfix"></div>
                            <label class="col-sm-2">{{ 'user.city' | translate }}</label>

                            <div class="col-sm-4">
                                {{items._patCase._patient._user._city.loca_Cn_Name}}
                            </div>
                            <label class="col-sm-2">{{ 'user.county' | translate }}</label>

                            <div class="col-sm-4">
                                {{items._patCase._patient._user._county.loca_Cn_Name}}
                            </div>
                            <div class="clearfix"></div>
                            <label class="col-sm-2">{{ 'user.address' | translate }}</label>

                            <div class="col-sm-10">
                            <textarea class="form-control no-radius" required
                                      ng-model="items._patCase._patient._user.location_Address"
                                      ng-disabled="viewOnly"></textarea>
                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">
                            <label>{{ 'business.navtitle.personalhistory' | translate }}</label>

                            <div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'1'"
                                           checklist-model="items._patCase._patient.history_Chem_Contact">
                                    {{ 'business.patcase.chemcontacthist' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'2'"
                                           checklist-model="items._patCase._patient.history_Chem_Contact">
                                    {{ 'business.patcase.chemcontacthist' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'3'"
                                           checklist-model="items._patCase._patient.history_Chem_Contact">
                                    {{ 'business.patcase.chemcontacthist' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'4'"
                                           checklist-model="items._patCase._patient.history_Epidemic_Area">
                                    {{ 'business.patcase.liveinepiarea' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'5'"
                                           checklist-model="items._patCase._patient.history_Epidemic_Area">
                                    {{ 'business.patcase.livewithepidemics' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'6'"
                                           checklist-model="items._patCase._patient.history_Epidemic_Area">
                                    {{ 'business.patcase.liveinepiwaterarea' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'7'"
                                           checklist-model="items._patCase._patient.history_Live_Area">
                                    {{ 'business.patcase.liveinpasarea' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'8'"
                                           checklist-model="items._patCase._patient.history_Live_Area">
                                    {{ 'business.patcase.liveinminingarea' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'9'"
                                           checklist-model="items._patCase._patient.history_Live_Area">
                                    {{ 'business.patcase.liveinhifloarea' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'10'"
                                           checklist-model="items._patCase._patient.history_Live_Area">
                                    {{ 'business.patcase.liveinlowioarea' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'11'"
                                           checklist-model="items._patCase._patient.history_Drug">
                                    {{ 'business.patcase.drugconthist' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'12'"
                                           checklist-model="items._patCase._patient.history_Smoking">
                                    {{ 'business.patcase.smokinghist' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'13'"
                                           checklist-model="items._patCase._patient.history_Drink">
                                    {{ 'business.patcase.drinkinghist' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" value="14" ng-true-value="'14'" ng-false-value="''"
                                           ng-model="items._patCase._patient.person_Menses" ng-disabled="true">
                                    {{ 'business.patcase.menopause' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <br/>
                                <label>{{ 'business.patcase.childrenstatus' | translate }}</label>

                                <div>
                                    <label class="col-sm-2">{{ 'business.patcase.childboyno' | translate }}</label>

                                    <div class="col-sm-4">
                                        <input type="text" class="form-control" min="0" data-max="10"
                                               ng-model="items._patCase._patient.child_Number_n" ng-disabled="true"
                                               ui-jq="TouchSpin" autocomplete="off">
                                    </div>
                                    <label class="col-sm-2">{{ 'business.patcase.childgirlno' | translate }}</label>

                                    <div class="col-sm-4">
                                        <input type="text" class="form-control" min="0" data-max="10"
                                               ng-model="items._patCase._patient.child_Number_m" ng-disabled="true"
                                               ui-jq="TouchSpin" autocomplete="off">
                                    </div>
                                    <div class="clearfix"></div>
                                    <label class="col-sm-2">{{ 'business.patcase.childhealth' | translate }}</label>

                                    <div class="col-sm-10">
                                        <textarea class="form-control no-radius"
                                                  ng-model="items._patCase._patient.child_Health"
                                                  ng-disabled="true"></textarea>

                                        <div class="clearfix"></div>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" ng-disabled="true" checklist-value="'15'"
                                                   checklist-model="items._patCase._patient.history_Family">
                                            {{ 'business.patcase.familyinfectdis' | translate }}
                                        </label>
                                        <label class="radio-inline">
                                            <input type="checkbox" ng-disabled="true" checklist-value="'16'"
                                                   checklist-model="items._patCase._patient.history_Family">
                                            {{ 'business.patcase.familyheredopa' | translate }}
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div class="line line-dashed b-b line-lg pull-in"></div>
                        <div class="form-group">
                            <label>{{ 'business.navtitle.pathistory' | translate }}</label>

                            <div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'17'"
                                           checklist-model="items._patCase._patient.history_Epidemic_Disease">
                                    {{ 'business.patcase.hepatitis' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'18'"
                                           checklist-model="items._patCase._patient.history_Epidemic_Disease">
                                    {{ 'business.patcase.tuberculosis' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-3">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'19'"
                                           checklist-model="items._patCase._patient.history_Epidemic_Disease">
                                    {{ 'business.patcase.helopyra' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'20'"
                                           checklist-model="items._patCase._patient.history_Diseases">
                                    {{ 'business.patcase.hypertension' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'21'"
                                           checklist-model="items._patCase._patient.history_Diseases">
                                    {{ 'business.patcase.heartdisease' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-3">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'22'"
                                           checklist-model="items._patCase._patient.history_Diseases">
                                    {{ 'business.patcase.diabetes' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'23'"
                                           checklist-model="items._patCase._patient.history_Diseases">
                                    {{ 'business.patcase.cerebralvascular' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'24'"
                                           checklist-model="items._patCase._patient.history_Diseases">
                                    {{ 'business.patcase.mentaldisease' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'25'"
                                           checklist-model="items._patCase._patient.history_Operation">
                                    {{ 'business.patcase.operationhistory' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'26'"
                                           checklist-model="items._patCase._patient.history_Operation">
                                    {{ 'business.patcase.woundhistory' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'28'"
                                           checklist-model="items._patCase._patient.history_Allergic">
                                    {{ 'business.patcase.foodallergy' | translate }}
                                </label>
                                <label class="checkbox-inline col-sm-4">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'27'"
                                           checklist-model="items._patCase._patient.history_Allergic">
                                    {{ 'business.patcase.medicineallergy' | translate }}
                                </label>

                                <div class="clearfix"></div>
                                <label class="checkbox-inline">
                                    <input type="checkbox" ng-disabled="true" checklist-value="'29'"
                                           checklist-model="items._patCase._patient.history_Vaccine">
                                    {{ 'business.patcase.vaccinehistory' | translate }}
                                </label>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </tab>
                    <tab heading="{{ 'business.navtitle.patcaseinfo' | translate }}">
                        <accordion close-others="oneAtATime">
                            <accordion-group is-open="true">
                                <div class="form-group">
                                    <label>{{ 'business.patcase.brief_Desc' | translate }}</label>
                                    <input type="text" ng-model="items._patCase.brief_Desc" class="form-control"
                                           ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                           required autocomplete="off">
                                </div>
                                <div class="form-group">
                                    <label>{{ 'business.patcase.main_Desc' | translate }}</label>
                                    <textarea rows="3" ng-model="items._patCase.main_Desc" class="form-control"
                                              style="overflow:auto;height:100px;max-height:100px"
                                              ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                              required></textarea>
                                </div>
                                <div class="form-group">
                                    <div class="row">
                                        <label class="col-sm-2 control-label">{{ 'business.patcase.spirit_State' |
                                            translate
                                            }}</label>

                                        <div class="col-sm-4">
                                            <label>
                                                <input type="radio" name="spirit_state"
                                                       ng-model="items._patCase.spirit_State" value="verygood"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.verygood' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="spirit_state"
                                                       ng-model="items._patCase.spirit_State" value="notgood"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.notgood' | translate }}
                                            </label>
                                        </div>
                                        <label class="col-sm-2 control-label">{{ 'business.patcase.strength' |
                                            translate
                                            }}</label>

                                        <div class="col-sm-4">
                                            <label>
                                                <input type="radio" name="strength" ng-model="items._patCase.strength"
                                                       value="verygood"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.verygood' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="strength" ng-model="items._patCase.strength"
                                                       value="notgood"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.notgood' | translate }}
                                            </label>
                                        </div>
                                    </div>
                                </div>

                                <div class="line line-dashed b-b line-lg pull-in"></div>
                                <div class="form-group">
                                    <div class="row">
                                        <label class="col-sm-2 control-label">{{ 'business.patcase.appetite' |
                                            translate
                                            }}</label>

                                        <div class="col-sm-4">
                                            <label>
                                                <input type="radio" name="appetite" ng-model="items._patCase.appetite"
                                                       value="verygood"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.verygood' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="appetite" ng-model="items._patCase.appetite"
                                                       value="good"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.good' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="appetite" ng-model="items._patCase.appetite"
                                                       value="notgood"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.notgood' | translate }}
                                            </label>
                                        </div>
                                        <label class="col-sm-2 control-label">{{ 'business.patcase.sleeping' |
                                            translate
                                            }}</label>

                                        <div class="col-sm-4">
                                            <label>
                                                <input type="radio" name="sleeping" ng-model="items._patCase.sleeping"
                                                       value="verygood"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.verygood' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="sleeping" ng-model="items._patCase.sleeping"
                                                       value="good"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.good' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="sleeping" ng-model="items._patCase.sleeping"
                                                       value="notgood"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.notgood' | translate }}
                                            </label>
                                        </div>
                                    </div>
                                </div>

                                <div class="line line-dashed b-b line-lg pull-in"></div>
                                <div class="form-group">
                                    <div class="row">
                                        <label class="col-sm-2 control-label">{{ 'business.patcase.gatism_Handling'
                                            |
                                            translate
                                            }}</label>

                                        <div class="col-sm-4">
                                            <label>
                                                <input type="radio" name="gatism_handling"
                                                       ng-model="items._patCase.gatism_Handling" value="usual"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.usual' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="gatism_handling"
                                                       ng-model="items._patCase.gatism_Handling" value="stool_usual"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'business.patcase.gatHand_stool' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="gatism_handling"
                                                       ng-model="items._patCase.gatism_Handling" value="urine_usual"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'business.patcase.gatHand_urine' | translate }}
                                            </label>
                                        </div>
                                        <label class="col-sm-2 control-label">{{ 'business.patcase.method_Transport'
                                            |
                                            translate
                                            }}</label>

                                        <div class="col-sm-4">
                                            <label>
                                                <input type="radio" name="method_transport"
                                                       ng-model="items._patCase.method_Transport" value="usual"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'common.usual' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="method_transport"
                                                       ng-model="items._patCase.method_Transport" value="wheelchair"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'business.patcase.metTran_wheelchair' | translate }}
                                            </label>
                                            <label>
                                                <input type="radio" name="method_transport"
                                                       ng-model="items._patCase.method_Transport" value="ambulance"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                {{ 'business.patcase.metTran_ambulance' | translate }}
                                            </label>
                                        </div>
                                    </div>
                                </div>

                                <div class="line line-dashed b-b line-lg pull-in"></div>
                                <div class="form-group">
                                    <div class="row">
                                        <label class="col-sm-2">{{ 'business.patcase.body_Temp' | translate
                                            }} </label>

                                        <div class="col-sm-10">
                                            <div class="input-group">
                                                <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$"
                                                       title="Number must greater than 0" type="text"
                                                       class="form-control" ng-model="items._patCase.body_Temp"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       autocomplete="off">
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.degree' |
                                                    translate }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-2">{{ 'business.patcase.heart_Beat' | translate
                                            }} </label>

                                        <div class="col-sm-10">
                                            <div class="input-group">
                                                <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$"
                                                       title="Number must greater than 0" type="text"
                                                       class="form-control" ng-model="items._patCase.heart_Beat"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       autocomplete="off">
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.notimes' |
                                                    translate }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-2">{{ 'business.patcase.breath_Int' | translate
                                            }} </label>

                                        <div class="col-sm-10">
                                            <div class="input-group">
                                                <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$"
                                                       title="Number must greater than 0" type="text"
                                                       class="form-control" ng-model="items._patCase.breath_Int"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       autocomplete="off">
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.notimes' |
                                                    translate }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-2">{{ 'business.patcase.weight' | translate }}</label>

                                        <div class="col-sm-4">
                                            <div class="input-group">
                                                <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$"
                                                       title="Number must greater than 0" type="text"
                                                       class="form-control" ng-model="items._patCase.weight"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       autocomplete="off">
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.kg' | translate
                                                    }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                        <label class="col-sm-2">{{ 'business.patcase.weight_change' | translate
                                            }}</label>

                                        <div class="col-sm-4">
                                            <div class="input-group">
                                                <input type="number" class="form-control"
                                                       ng-model="items._patCase.weight_Change"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       required>
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.kg' | translate
                                                    }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-2">{{ 'business.patcase.bmi' | translate }}</label>

                                        <div class="col-sm-4">
                                            <div class="input-group">
                                                <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$"
                                                       title="Number must greater than 0" type="text"
                                                       class="form-control" ng-model="items._patCase.bmi"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       autocomplete="off">
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.kg' | translate
                                                    }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                        <label class="col-sm-2">{{ 'business.patcase.height' | translate }}</label>

                                        <div class="col-sm-4">
                                            <div class="input-group">
                                                <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$"
                                                       title="Number must greater than 0" type="text"
                                                       class="form-control" ng-model="items._patCase.height"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       autocomplete="off">
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.cm' | translate
                                                    }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-2">{{ 'business.patcase.blood_Pressure_High' |
                                            translate
                                            }} </label>

                                        <div class="col-sm-4">
                                            <div class="input-group">
                                                <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$"
                                                       title="Number must greater than 0" type="text"
                                                       class="form-control"
                                                       ng-model="items._patCase.blood_Pressure_High"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       autocomplete="off">
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.mmHg' |
                                                    translate }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                        <label class="col-sm-2">{{ 'business.patcase.blood_Pressure_Low' | translate
                                            }} </label>

                                        <div class="col-sm-4">
                                            <div class="input-group">
                                                <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$"
                                                       title="Number must greater than 0" type="text"
                                                       class="form-control"
                                                       ng-model="items._patCase.blood_Pressure_Low"
                                                       ng-disabled="items._patCase.isedit==false || items._patCase.isedit == null"
                                                       autocomplete="off">
                                                <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.mmHg' |
                                                    translate }}
                                                </button>
                                            </span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </accordion-group>
                        </accordion>
                    </tab>
                </tabset>
            </a>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()">{{ 'common.cancel' | translate }}</button>
    </div>
</script>

<script type="text/ng-template" id="AssignOpeTime.html">
    <div class="modal-header">
        <h4>{{'business.accumulation.arrangeSurgeryCenter' | translate}}
            <button type="button" style="height:42px;margin-right:10px;" class="close" ng-click="cancel()"><span
                    class="icon icon-close" aria-hidden="true"></span></button>
        </h4>
    </div>
    <div class="modal-body">
        <h4>{{'business.accumulation.currentSurgeryCenter' | translate}} - {{items.length}}</h4>
        <select name="account" class="form-control m-b" ng-model="selected.item">
            <option value="{{item.opeCenTime_Id}}" ng-repeat="item in items">
                {{ (selectLang == 'English') ? item._hosp.hosp_En_Name : item._hosp.hosp_Cn_Name }}
                ( {{'business.accumulation.dateOpe' | translate}} : {{item.date_Operation == null ? '-' :
                moment(item.date_Operation).format('YYYY-MM-DD')}})
            </option>
        </select>
        <!-- Selected: <b>{{ selected.item }}</b> -->
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()">{{ 'common.cancel' | translate }}</button>
        <button class="btn btn-primary" ng-click="ok()">{{ 'common.ok' | translate }}</button>
    </div>
</script>

<!-- set surgeon of OCT -->
<script type="text/ng-template" id="AssignSurgeon.html">
    <div class="modal-header">
        <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span>
        </button>
        <h4>{{"business.accumulation.assignSurgeon" | translate}}</h4>
    </div>
    <div class="modal-body" ng-controller="AccumulationDataTableController">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th><span translate="common.number"></span></th>
                <th><span translate="common.name"></span></th>
                <th ng-if="!isSmart"><span translate="user.gender"></span></th>
                <th><span translate="servicecreate.hospital"></span></th>
                <th><span translate="servicecreate.departments"></span></th>
                <th translate="user.mobilephone" ng-if="!isSmart"></th>
                <th><span translate="common.operate"></span></th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="item in items.surgeons">
                <td><span>{{$index+1}}</span></td>
                <td>{{item.realName}}</td>
                <td ng-if="!isSmart">{{'user.gender.' + item.gender | translate}}</td>
                <td>{{(selectLang == 'English') ? item._doctor._hosp.hosp_En_Name : item._doctor._hosp.hosp_Cn_Name}}
                </td>
                <td>{{(selectLang == 'English') ? item._doctor._dept.dept_En_Name : item._doctor._dept.dept_Cn_Name}}
                </td>
                <td ng-if="!isSmart">{{item.mobile_Phone}}</td>
                <td>
                    <button type="button" class="btn btn-sm btn-danger"
                            ng-click="setSurgeon(items.opeCenTime_Id, item.userId)"
                            translate="common.select"></button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()">{{ 'common.cancel' | translate }}</button>
    </div>
</script>

<!-- add a new servReq to OCT -->
<script type="text/ng-template" id="AssignServRequest.html">
    <div class="modal-header">
        <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span>
        </button>
        <h4>{{"business.accumulation.assignPatient" | translate}}</h4>
    </div>
    <div class="modal-body">
        <div class="panel panel-default" ng-controller="AccumulationDataTableController">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-sm-6 pull-right form-inline">
                        <div class="form-group">
                            <input ng-model="$parent.search" class="form-control"
                                   placeholder="{{'business.navtitle.keyword' | translate}}"
                                   type="text" style="width:200px;margin-bottom: 0;" autocomplete="off">
                        </div>
                        <div class="form-group">
                            <button type="button" class="btn btn-success font-bold"
                                    ng-click="startSearch($parent.search)">
                                <span translate="business.navtitle.search_patient">Search</span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel-body">
                <table ui-jq="dataTable" ui-options="dtOptions" class="table table-striped m-b-none"
                       style="width: 100%;">
                    <thead>
                    <tr>
                        <th translate="business.servreq.id"></th>
                        <th translate="common.name"></th>
                        <th translate="user.gender" ng-if="!isSmart"></th>
                        <th translate="business.patcase.disease_type" ng-if="!isSmart"></th>
                        <th translate="user.province" ng-if="!isSmart"></th>
                        <th translate="user.city" ng-if="!isSmart"></th>
                        <th translate="common.operate" style="width:20%;"></th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="serv in servRequests">
                        <td>S-{{ serv.servReq_Id }}</td>
                        <td>{{ serv._patCase._patient._user.realName }}</td>
                        <td ng-if="!isSmart">
                                    <span ng-show="serv._patCase._patient._user.gender != null">
                                    {{ 'user.gender.' + serv._patCase._patient._user.gender  | translate}}
                                    </span>
                        </td>
                        <td ng-if="!isSmart">{{'business.patcase.disease_type_' + serv._diseaseType.desc | translate}}
                        </td>

                        <td ng-if="!isSmart">{{ selectLang == 'English' ?
                            serv._patCase._patient._user._province.loca_En_Name :
                            serv._patCase._patient._user._province.loca_Cn_Name }}
                        </td>
                        <td ng-if="!isSmart">{{ selectLang == 'English' ?
                            serv._patCase._patient._user._city.loca_En_Name :
                            serv._patCase._patient._user._city.loca_Cn_Name }}
                        </td>

                        <td style="width:20%;">
                            <button type="button" ng-click="open({ templateUrl: 'openServReq.html'}, {{ serv }} );"
                                    class="btn btn-sm btn-info font-bold" title="{{ 'common.details' | translate }}">
                                {{'common.details' | translate}}
                            </button>
                            <button type="button" ng-click="assignServReq(items.opeCenTime_Id,serv.servReq_Id)"
                                    class="btn btn-sm btn-success font-bold"
                                    title="{{'business.accumulation.arrangeSurgeryCenter' | translate}}">
                                {{'business.navtitle.arrange' | translate}}
                            </button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()">{{ 'common.cancel' | translate }}</button>
    </div>
</script>

<!-- set operation time of OCT -->
<script type="text/ng-template" id="TimeOfOCT.html">
    <div class="modal-header">
        <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span>
        </button>
        <h4>{{ 'business.accumulation.operation'|translate}}</h4>
    </div>
    <div class="modal-body" ng-controller="DatepickerDemoCtrl">
        <h4>{{ 'business.accumulation.dateOpe'|translate}}</h4>
        <input type="text" class="form-inline" datepicker-popup="yyyy-MM-dd" is-open="opened"
               datepicker-options="dateOptions" ng-required="true"
               current-text="{{'common.today'|translate}}"
               clear-text="{{'common.clear'|translate}}"
               close-text="{{'common.close'|translate}}"
               ng-model="selected.item"
               min-date="minDate"
               style="background-color: #fff;text-align: center;padding: 6px 12px;" disabled/>
        <button type="button" class="btn btn-default" ng-click="open($event)"><i
                class="glyphicon glyphicon-calendar"></i></button>

    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()">{{ 'common.cancel' | translate }}</button>
        <button class="btn btn-primary" ng-show="selected.item != '' && selected.item != null" ng-click="ok()">{{
            'common.ok' | translate }}
        </button>
    </div>
</script>

<!-- Popup window of New OCT, used in function openAddOCT() -->
<script type="text/ng-template" id="AddOCT.html">
    <div class="modal-header">
        <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span>
        </button>
        <h4>{{"business.accumulation.addOpeTime" | translate}}</h4>
    </div>
    <div class="modal-body">
        <select name="account" class="form-control m-b" ng-model="selected.item.hosp_Id">
            <option value="{{item.hosp_Id}}" ng-repeat="item in items">{{ item.hosp_Cn_Name }}</option>
        </select>
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()">{{ 'common.cancel' | translate }}</button>
        <button class="btn btn-success" ng-click="ok()"
                ng-show="selected.item.hosp_Id != null && selected.item.hosp_Id != ''">{{ 'common.ok' | translate }}
        </button>
    </div>
</script>

<!-- Popup window of Delete one OCT, used in function openDeleteOCT() -->
<script type="text/ng-template" id="DeleteOCT.html">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close"
                                                                          aria-hidden="true"></span></button>
            <h4 class="modal-title" id="myModalLabel"><span translate="business.accumulation.deleteOCT"></span></h4>
        </div>
        <div class="modal-body">
            <form class="form-horizontal">
                <div class="form-group row">
                    <label class="col-sm-12 control-label text-left"><p class="text-muted"><span
                            translate="business.accumulation.deleteOCTTips"></span></p></label>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 control-label "><span translate="business.hosp.name"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="" value="{{items._hosp.hosp_Cn_Name}}"
                               disabled style="cursor:default">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 control-label "><span translate="business.accumulation.surgeondoctor"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="" value="{{items._surgeon.realName}}"
                               disabled style="cursor:default">
                    </div>
                    <label class="col-sm-2 control-label" translate=""><span
                            translate="business.accumulation.dateOpe"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{(items.date_Operation)?moment(items.date_Operation).format('YYYY-MM-DD'):''}}"
                               disabled style="cursor:default">
                    </div>
                </div>
                <form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" ng-click="cancel()"><span translate="common.close"></span>
            </button>
            <button type="button" class="btn btn-primary" ng-click="ok()"><span translate="common.ok"></span></button>
        </div>
    </div>
</script>

<!-- Popup window of FinishOCT -->
<script type="text/ng-template" id="FinishOCT.html">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close"
                                                                          aria-hidden="true"></span></button>
            <h4 class="modal-title" id="myModalLabel"><span translate="business.accumulation.finishOCT"></span></h4>
        </div>
        <div class="modal-body">
            <form class="form-horizontal">
                <div class="form-group row">
                    <label class="col-sm-12 control-label text-left"><p class="text-muted"><span
                            translate="business.accumulation.finishOCTTips"></span></p></label>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 control-label "><span translate="business.hosp.name"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="" value="{{items._hosp.hosp_Cn_Name}}"
                               disabled style="cursor:default">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 control-label "><span translate="business.accumulation.surgeondoctor"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="" value="{{items._surgeon.realName}}"
                               disabled style="cursor:default">
                    </div>
                    <label class="col-sm-2 control-label" translate=""><span
                            translate="business.accumulation.dateOpe"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{(items.date_Operation)?moment(items.date_Operation).format('YYYY-MM-DD'):''}}"
                               disabled style="cursor:default">
                    </div>
                </div>
                <form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" ng-click="cancel()"><span translate="common.close"></span>
            </button>
            <button type="button" class="btn btn-primary" ng-click="ok()"><span translate="common.ok"></span></button>
        </div>
    </div>
</script>

<script type="text/ng-template" id="RefuseForOperation.html">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close"
                                                                          aria-hidden="true"></span></button>
            <h4 class="modal-title" id="myModalLabel"><span translate="business.accumulation.refuseForOperation"></span>
            </h4>
        </div>
        <div class="modal-body">
            <form class="form-horizontal">
                <div class="form-group row">
                    <label class="col-sm-12 control-label text-left"><p class="text-muted"><span
                            translate="business.accumulation.refuseForOperationTips"></span></p></label>
                </div>

                <div class="form-group row">
                    <label class="col-sm-2 control-label "><span translate="common.name"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{items._patCase._patient._user.realName}}" disabled style="cursor:default">
                    </div>
                    <label class="col-sm-2 control-label "><span translate="user.gender"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{'user.gender.' + items._patCase._patient._user.gender | translate}}" disabled
                               style="cursor:default">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 control-label "><span
                            translate="business.patcase.disease_type"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{'business.patcase.disease_type_' + items._diseaseType.desc | translate}}"
                               disabled style="cursor:default">
                    </div>
                    <label class="col-sm-2 control-label" translate=""><span translate="common.updated"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{moment(items.updated).format('YYYY-MM-DD')}}" disabled style="cursor:default">
                    </div>
                </div>
                <form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" ng-click="cancel()"><span translate="common.close"></span>
            </button>
            <button type="button" class="btn btn-primary" ng-click="ok()"><span translate="common.ok"></span></button>
        </div>
    </div>
</script>

<script type="text/ng-template" id="openRevokeFromOCT.html">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" ng-click="cancel()"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel"><span translate="business.accumulation.revokeFromOCT"></span></h4>
        </div>
        <div class="modal-body">
            <form class="form-horizontal">
                <div class="form-group row">
                    <label class="col-sm-12 control-label text-left"><p class="text-muted"><span
                            translate="business.accumulation.revokeFromOCTTips"></span></p></label>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 control-label "><span translate="common.name"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{items._patCase._patient._user.realName}}" disabled style="cursor:default">
                    </div>
                    <label class="col-sm-2 control-label "><span translate="user.gender"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{'user.gender.' + items._patCase._patient._user.gender | translate}}" disabled
                               style="cursor:default">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 control-label "><span
                            translate="business.patcase.disease_type"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{'business.patcase.disease_type_' + items._diseaseType.desc | translate}}"
                               disabled style="cursor:default">
                    </div>
                    <label class="col-sm-2 control-label" translate=""><span
                            translate="business.servreq.paid"></span></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder=""
                               value="{{(items.paid == 0 ? 'business.servreq.paid0' : 'business.servreq.paid1') | translate}}"
                               disabled style="cursor:default">
                    </div>
                </div>
                <form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" ng-click="cancel()"><span translate="common.cancel"></span>
            </button>
            <button type="button" class="btn btn-primary" ng-click="ok()"><span translate="common.ok"></span></button>
        </div>
    </div>
</script>
